home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / B-C / C++ FAQ Reference 1.0 / C++ FAQ Reference 1.0.rsrc / TEXT_1529.txt < prev    next >
Encoding:
Text File  |  1993-06-30  |  594 b   |  5 lines

  1. Use the same 'extern "C" f()' construct as detailed in the previous question, only then proceed to actually define the function in your C++ module. The compiler will ensure that the external information sent to the linker uses C calling conventions and name mangling (ex: preceded by a single underscore). Obviously you can't make several overloaded fns simultaneously callable by a C program, since name overloading isn't supported by C.
  2.  
  3. Caveats and implementation dependencies:
  4. * your 'main()' should be compiled with your C++ compiler.
  5. * your C++ compiler should direct the linking process.